/**
 * 
 */
package cn.gov.msa.service.impl;

import org.springframework.beans.factory.annotation.Autowired;

import cn.gov.msa.dao.FileMapper;
import cn.gov.msa.model.File;
import cn.gov.msa.service.FileService;

/**   
* @Title: FileServiceImpl.java 
* @Package cn.gov.msa.service.impl 
* @Description: TODO(用一句话描述该文件做什么) 
* @author 何宇江  
* @date 2018年3月21日 下午6:05:59 
*/
public class FileServiceImpl implements FileService {

	@Autowired
	FileMapper fileMapper;
	
	@Override
	public String save(File file) throws Exception {
		String fileId = "";
		
    	fileMapper.insert(file);
    	
    	fileId = file.getFileid();
    	
		return fileId;
	}

	@Override
	public File selectByPrimaryKey(String fileid) throws Exception {
		File file = new File();
		
		file = fileMapper.selectByPrimaryKey(fileid);
    	
    	
		return file;
	}
}
